.class public Lcom/TwinBlade/PicturePassword/LockActivity;
.super Landroid/app/Activity;
.source "SourceFile"


# static fields
.field private static b:Landroid/app/Activity;

.field private static c:Landroid/view/Window;

.field private static d:Landroid/view/View;

.field private static e:Z


# instance fields
.field private a:Landroid/content/SharedPreferences;

.field private final f:Landroid/content/BroadcastReceiver;


# direct methods
.method static constructor <clinit>()V
    .locals 1

    .prologue
    .line 24
    const/4 v0, 0x0

    sput-boolean v0, Lcom/TwinBlade/PicturePassword/LockActivity;->e:Z

    return-void
.end method

.method public constructor <init>()V
    .locals 1

    .prologue
    .line 17
    invoke-direct {p0}, Landroid/app/Activity;-><init>()V

    .line 173
    new-instance v0, Lcom/TwinBlade/PicturePassword/ai;

    invoke-direct {v0, p0}, Lcom/TwinBlade/PicturePassword/ai;-><init>(Lcom/TwinBlade/PicturePassword/LockActivity;)V

    iput-object v0, p0, Lcom/TwinBlade/PicturePassword/LockActivity;->f:Landroid/content/BroadcastReceiver;

    .line 17
    return-void
.end method

.method public static a()V
    .locals 2

    .prologue
    .line 80
    sget-object v0, Lcom/TwinBlade/PicturePassword/LockActivity;->c:Landroid/view/Window;

    if-eqz v0, :cond_0

    .line 81
    sget-object v0, Lcom/TwinBlade/PicturePassword/LockActivity;->c:Landroid/view/Window;

    const/high16 v1, 0x20

    invoke-virtual {v0, v1}, Landroid/view/Window;->clearFlags(I)V

    .line 82
    sget-object v0, Lcom/TwinBlade/PicturePassword/LockActivity;->c:Landroid/view/Window;

    const/high16 v1, 0x40

    invoke-virtual {v0, v1}, Landroid/view/Window;->clearFlags(I)V

    .line 84
    :cond_0
    return-void
.end method

.method public static a(Z)V
    .locals 5
    .parameter

    .prologue
    const/16 v4, 0x10

    const/16 v3, 0x8

    const/4 v2, 0x0

    .line 102
    sget-object v0, Lcom/TwinBlade/PicturePassword/LockActivity;->d:Landroid/view/View;

    if-eqz v0, :cond_0

    .line 103
    if-eqz p0, :cond_2

    .line 104
    sget-object v0, Lcom/TwinBlade/PicturePassword/LockActivity;->d:Landroid/view/View;

    const/16 v1, 0xff

    invoke-static {v1, v2, v2, v2}, Landroid/graphics/Color;->argb(IIII)I

    move-result v1

    invoke-virtual {v0, v1}, Landroid/view/View;->setBackgroundColor(I)V

    .line 109
    :cond_0
    :goto_0
    sget-object v0, Lcom/TwinBlade/PicturePassword/LockActivity;->c:Landroid/view/Window;

    if-eqz v0, :cond_1

    .line 110
    if-eqz p0, :cond_3

    .line 111
    sget-object v0, Lcom/TwinBlade/PicturePassword/LockActivity;->c:Landroid/view/Window;

    invoke-virtual {v0, v4}, Landroid/view/Window;->clearFlags(I)V

    .line 112
    sget-object v0, Lcom/TwinBlade/PicturePassword/LockActivity;->c:Landroid/view/Window;

    invoke-virtual {v0, v3}, Landroid/view/Window;->clearFlags(I)V

    .line 118
    :cond_1
    :goto_1
    return-void

    .line 106
    :cond_2
    sget-object v0, Lcom/TwinBlade/PicturePassword/LockActivity;->d:Landroid/view/View;

    invoke-static {v2, v2, v2, v2}, Landroid/graphics/Color;->argb(IIII)I

    move-result v1

    invoke-virtual {v0, v1}, Landroid/view/View;->setBackgroundColor(I)V

    goto :goto_0

    .line 114
    :cond_3
    sget-object v0, Lcom/TwinBlade/PicturePassword/LockActivity;->c:Landroid/view/Window;

    invoke-virtual {v0, v4, v4}, Landroid/view/Window;->setFlags(II)V

    .line 115
    sget-object v0, Lcom/TwinBlade/PicturePassword/LockActivity;->c:Landroid/view/Window;

    invoke-virtual {v0, v3, v3}, Landroid/view/Window;->setFlags(II)V

    goto :goto_1
.end method

.method public static b()V
    .locals 2

    .prologue
    .line 87
    sget-object v0, Lcom/TwinBlade/PicturePassword/LockActivity;->c:Landroid/view/Window;

    if-eqz v0, :cond_0

    .line 88
    sget-object v0, Lcom/TwinBlade/PicturePassword/LockActivity;->c:Landroid/view/Window;

    const/high16 v1, 0x60

    invoke-virtual {v0, v1}, Landroid/view/Window;->addFlags(I)V

    .line 91
    :cond_0
    return-void
.end method

.method public static c()V
    .locals 2

    .prologue
    const/4 v1, 0x0

    .line 94
    sget-object v0, Lcom/TwinBlade/PicturePassword/LockActivity;->b:Landroid/app/Activity;

    if-eqz v0, :cond_0

    .line 95
    const-string v0, "LOCK ACTIVITY EXIT"

    invoke-static {v0}, Lcom/TwinBlade/PicturePassword/Utilities;->a(Ljava/lang/String;)V

    .line 96
    sget-object v0, Lcom/TwinBlade/PicturePassword/LockActivity;->b:Landroid/app/Activity;

    invoke-virtual {v0}, Landroid/app/Activity;->finish()V

    .line 97
    sget-object v0, Lcom/TwinBlade/PicturePassword/LockActivity;->b:Landroid/app/Activity;

    invoke-virtual {v0, v1, v1}, Landroid/app/Activity;->overridePendingTransition(II)V

    .line 99
    :cond_0
    return-void
.end method

.method public static d()Z
    .locals 1

    .prologue
    .line 121
    sget-boolean v0, Lcom/TwinBlade/PicturePassword/LockActivity;->e:Z

    return v0
.end method

.method private e()Z
    .locals 2

    .prologue
    const/4 v0, 0x0

    .line 67
    invoke-virtual {p0}, Lcom/TwinBlade/PicturePassword/LockActivity;->getIntent()Landroid/content/Intent;

    move-result-object v1

    .line 68
    if-nez v1, :cond_1

    .line 76
    :cond_0
    :goto_0
    return v0

    .line 72
    :cond_1
    invoke-virtual {v1}, Landroid/content/Intent;->getExtras()Landroid/os/Bundle;

    move-result-object v1

    .line 73
    if-eqz v1, :cond_0

    .line 74
    const-string v0, "OnBoot"

    invoke-virtual {v1, v0}, Landroid/os/Bundle;->getBoolean(Ljava/lang/String;)Z

    move-result v0

    goto :goto_0
.end method


# virtual methods
.method public onCreate(Landroid/os/Bundle;)V
    .locals 6
    .parameter

    .prologue
    const/high16 v5, 0x40

    const/4 v4, 0x1

    const/4 v3, 0x0

    .line 29
    invoke-static {p0}, Landroid/preference/PreferenceManager;->getDefaultSharedPreferences(Landroid/content/Context;)Landroid/content/SharedPreferences;

    move-result-object v0

    iput-object v0, p0, Lcom/TwinBlade/PicturePassword/LockActivity;->a:Landroid/content/SharedPreferences;

    .line 30
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/LockActivity;->a:Landroid/content/SharedPreferences;

    const-string v1, "ForceOrientation"

    const-string v2, "0"

    invoke-interface {v0, v1, v2}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    .line 31
    const-string v1, "0"

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_5

    .line 32
    invoke-static {}, Lcom/TwinBlade/PicturePassword/Utilities;->a()Z

    move-result v0

    if-nez v0, :cond_4

    .line 33
    invoke-virtual {p0, v4}, Lcom/TwinBlade/PicturePassword/LockActivity;->setRequestedOrientation(I)V

    .line 43
    :cond_0
    :goto_0
    invoke-super {p0, p1}, Landroid/app/Activity;->onCreate(Landroid/os/Bundle;)V

    .line 45
    new-instance v0, Landroid/view/View;

    invoke-direct {v0, p0}, Landroid/view/View;-><init>(Landroid/content/Context;)V

    sput-object v0, Lcom/TwinBlade/PicturePassword/LockActivity;->d:Landroid/view/View;

    .line 46
    sget-object v0, Lcom/TwinBlade/PicturePassword/LockActivity;->d:Landroid/view/View;

    invoke-static {v3, v3, v3, v3}, Landroid/graphics/Color;->argb(IIII)I

    move-result v1

    invoke-virtual {v0, v1}, Landroid/view/View;->setBackgroundColor(I)V

    .line 48
    invoke-static {p0}, Landroid/preference/PreferenceManager;->getDefaultSharedPreferences(Landroid/content/Context;)Landroid/content/SharedPreferences;

    move-result-object v0

    iput-object v0, p0, Lcom/TwinBlade/PicturePassword/LockActivity;->a:Landroid/content/SharedPreferences;

    .line 49
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/LockActivity;->a:Landroid/content/SharedPreferences;

    const-string v1, "DisplayStockLockscreen"

    invoke-interface {v0, v1, v3}, Landroid/content/SharedPreferences;->getBoolean(Ljava/lang/String;Z)Z

    move-result v0

    .line 50
    iget-object v1, p0, Lcom/TwinBlade/PicturePassword/LockActivity;->a:Landroid/content/SharedPreferences;

    const-string v2, "EasyWake"

    invoke-interface {v1, v2, v4}, Landroid/content/SharedPreferences;->getBoolean(Ljava/lang/String;Z)Z

    move-result v1

    .line 52
    if-nez v0, :cond_1

    if-nez v1, :cond_2

    :cond_1
    invoke-direct {p0}, Lcom/TwinBlade/PicturePassword/LockActivity;->e()Z

    move-result v0

    if-eqz v0, :cond_3

    .line 53
    :cond_2
    invoke-virtual {p0}, Lcom/TwinBlade/PicturePassword/LockActivity;->getWindow()Landroid/view/Window;

    move-result-object v0

    invoke-virtual {v0, v5, v5}, Landroid/view/Window;->setFlags(II)V

    .line 56
    :cond_3
    sget-object v0, Lcom/TwinBlade/PicturePassword/LockActivity;->d:Landroid/view/View;

    invoke-virtual {p0, v0}, Lcom/TwinBlade/PicturePassword/LockActivity;->setContentView(Landroid/view/View;)V

    .line 57
    sput-object p0, Lcom/TwinBlade/PicturePassword/LockActivity;->b:Landroid/app/Activity;

    .line 58
    invoke-virtual {p0}, Lcom/TwinBlade/PicturePassword/LockActivity;->getWindow()Landroid/view/Window;

    move-result-object v0

    sput-object v0, Lcom/TwinBlade/PicturePassword/LockActivity;->c:Landroid/view/Window;

    .line 59
    invoke-static {v3}, Lcom/TwinBlade/PicturePassword/LockActivity;->a(Z)V

    .line 61
    sput-boolean v3, Lcom/TwinBlade/PicturePassword/Utilities;->a:Z

    .line 63
    const-string v0, "LOCK ACTIVITY CREATED"

    invoke-static {v0}, Lcom/TwinBlade/PicturePassword/Utilities;->a(Ljava/lang/String;)V

    .line 64
    return-void

    .line 35
    :cond_4
    invoke-virtual {p0, v3}, Lcom/TwinBlade/PicturePassword/LockActivity;->setRequestedOrientation(I)V

    goto :goto_0

    .line 37
    :cond_5
    const-string v1, "1"

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_6

    .line 38
    invoke-virtual {p0, v4}, Lcom/TwinBlade/PicturePassword/LockActivity;->setRequestedOrientation(I)V

    goto :goto_0

    .line 39
    :cond_6
    const-string v1, "2"

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 40
    invoke-virtual {p0, v3}, Lcom/TwinBlade/PicturePassword/LockActivity;->setRequestedOrientation(I)V

    goto :goto_0
.end method

.method public onPause()V
    .locals 1

    .prologue
    .line 150
    invoke-super {p0}, Landroid/app/Activity;->onPause()V

    .line 152
    :try_start_0
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/LockActivity;->f:Landroid/content/BroadcastReceiver;

    invoke-virtual {p0, v0}, Lcom/TwinBlade/PicturePassword/LockActivity;->unregisterReceiver(Landroid/content/BroadcastReceiver;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 156
    :goto_0
    const-string v0, "LOCK ACTIVITY ON PAUSE"

    invoke-static {v0}, Lcom/TwinBlade/PicturePassword/Utilities;->a(Ljava/lang/String;)V

    .line 157
    return-void

    .line 153
    :catch_0
    move-exception v0

    goto :goto_0
.end method

.method public onResume()V
    .locals 3

    .prologue
    const/4 v2, 0x0

    .line 126
    const/4 v0, 0x1

    sput-boolean v0, Lcom/TwinBlade/PicturePassword/LockActivity;->e:Z

    .line 128
    new-instance v0, Landroid/content/IntentFilter;

    const-string v1, "com.TwinBlade.PicturePassword.EXIT_LOCK"

    invoke-direct {v0, v1}, Landroid/content/IntentFilter;-><init>(Ljava/lang/String;)V

    .line 129
    iget-object v1, p0, Lcom/TwinBlade/PicturePassword/LockActivity;->f:Landroid/content/BroadcastReceiver;

    invoke-virtual {p0, v1, v0}, Lcom/TwinBlade/PicturePassword/LockActivity;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;

    .line 131
    invoke-static {}, Lcom/TwinBlade/PicturePassword/bl;->b()Z

    move-result v0

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/LockActivity;->a:Landroid/content/SharedPreferences;

    const-string v1, "InfoPanel"

    invoke-interface {v0, v1, v2}, Landroid/content/SharedPreferences;->getBoolean(Ljava/lang/String;Z)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 132
    invoke-static {p0, v2}, Lcom/TwinBlade/PicturePassword/bl;->a(Landroid/content/Context;Z)Lcom/TwinBlade/PicturePassword/bl;

    move-result-object v0

    .line 133
    invoke-virtual {v0}, Lcom/TwinBlade/PicturePassword/bl;->e()V

    .line 134
    invoke-virtual {v0}, Lcom/TwinBlade/PicturePassword/bl;->f()V

    .line 135
    invoke-virtual {v0, v2}, Lcom/TwinBlade/PicturePassword/bl;->a(Z)V

    .line 138
    :cond_0
    invoke-static {p0, v2}, Lcom/TwinBlade/PicturePassword/bl;->a(Landroid/content/Context;Z)Lcom/TwinBlade/PicturePassword/bl;

    move-result-object v0

    .line 139
    if-eqz v0, :cond_1

    .line 140
    invoke-virtual {v0, v2}, Lcom/TwinBlade/PicturePassword/bl;->e(Z)V

    .line 143
    :cond_1
    invoke-super {p0}, Landroid/app/Activity;->onResume()V

    .line 145
    const-string v0, "LOCK ACTIVITY ON RESUME"

    invoke-static {v0}, Lcom/TwinBlade/PicturePassword/Utilities;->a(Ljava/lang/String;)V

    .line 146
    return-void
.end method

.method public onWindowFocusChanged(Z)V
    .locals 2
    .parameter

    .prologue
    const/4 v1, 0x0

    .line 161
    if-eqz p1, :cond_0

    .line 162
    invoke-static {}, Lcom/TwinBlade/PicturePassword/bl;->b()Z

    move-result v0

    if-nez v0, :cond_0

    .line 163
    invoke-virtual {p0}, Lcom/TwinBlade/PicturePassword/LockActivity;->finish()V

    .line 164
    invoke-virtual {p0, v1, v1}, Lcom/TwinBlade/PicturePassword/LockActivity;->overridePendingTransition(II)V

    .line 168
    :cond_0
    new-instance v0, Ljava/lang/StringBuilder;

    const-string v1, "WINDOW FOCUS CHANGED "

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Lcom/TwinBlade/PicturePassword/Utilities;->a(Ljava/lang/String;)V

    .line 170
    invoke-super {p0, p1}, Landroid/app/Activity;->onWindowFocusChanged(Z)V

    .line 171
    return-void
.end method
